Creating a Constraint
Description
To create a new constraint in the Model Tree:
Select the position in a Declaration Section where the new constraint should be inserted
From the Edit menu select Insert – Constraint
Enter a name for the new constraint (if you are creating a multi-dimensional constraint, you can type the indices of each dimension as well)
Press
<Enter>
to create the new constraint (or press<Esc>
to abort the operation)
The newly created constraint is not yet ready for use, because you should at least specify the definition of a constraint via its attributes. To modify the attributes of the newly created constraint:
Press
<Enter>
or double click on the constraint node.
The most commonly used attributes of a constraint are discussed below.
INDEX DOMAIN
: TheINDEX DOMAIN
attribute should be specified in order to declare indexed constraints. Thewizard will display the Set Dependency Tree of your model and allows you to select one or more indices.
UNIT
: TheUNIT
attribute is used to specify the unit in which the constraint’s RHS value is measured. By specifying a unit, AIMMS is able to perform automatic unit conversions and unit consistency checks. Thewizard will let you select a unit and quantity from the list made up from your model quantities and units together with the information in the AIMMS SI unit base.
PROPERTY
: ThePROPERTY
attribute should be used to specify additional properties. Note that in order to retrieve sensitivity information from the solver, theShadowPrices
,RightHandSideRange
, orShadowPriceRange
property should be explicitly set. Thewizard will let you specify the properties through a selection of radio buttons and check boxes.
DEFINITION
: TheDEFINITION
attribute is mandatory and should contain the constraint formulation containing two or three expressions separated by one of the relational operators=
,<=
, or>=
.
Learn more about